package cn.dzhy.myzf.qq.email.model;

import com.alibaba.fastjson.annotation.JSONField;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.List;

/**
 * 邮件群组的对象
 * @package cn.dzhy.myzf.qq.email.model
 * @Date Created in 2018/3/15 下午11:05
 * @Author myzf
 */
public class Group implements Serializable {

    /**必填
     * 邮件群组名称
     * */
    @JSONField(name = "groupid")
    private String groupId;

    /**必填
     * 邮件群组名称
     * */
    @JSONField(name = "groupname")
    private String groupName;

    /** 非必填
     * 成员帐号，userlist，grouplist，department至少一个。成员由userlist，grouplist，department共同组成
     * */
    @JSONField(name = "userlist")
    private List<String> userList;

    /** 非必填
     * 成员邮件群组，userlist，grouplist，department至少一个。成员由userlist，grouplist，department共同组成
     * */
    @JSONField(name = "grouplist")
    private List<String> groupList;

    /** 非必填
     * 成员部门，userlist，grouplist，department至少一个。成员由userlist，grouplist，department共同组成
     * */
    @JSONField(name = "department")
    private List<BigInteger> partyIds;

    /** 必填
     * 群发权限。0: 企业成员, 1任何人， 2:组内成员，3:指定成员
     * */
    @JSONField(name = "allow_type")
    private int allowType;

    /** 非必填
     * 群发权限为指定成员时，需要指定成员
     * */
    @JSONField(name = "allow_userlist")
    private List<String> allowUserList;



    protected Group(){}

    /**
     * 群组的id,中文名字,组内成员,允许谁
     * */
   public Group(String groupId,String groupName,List<String> userList,int allowType){
        this.groupId = groupId;
        this.groupName = groupName;
        this.userList = userList;
        this.allowType = allowType;
   }



    public String getGroupId() {
        return groupId;
    }

    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public List<String> getUserList() {
        return userList;
    }

    public void setUserList(List<String> userList) {
        this.userList = userList;
    }

    public List<String> getGroupList() {
        return groupList;
    }

    public void setGroupList(List<String> groupList) {
        this.groupList = groupList;
    }

    public List<BigInteger> getPartyIds() {
        return partyIds;
    }

    public void setPartyIds(List<BigInteger> partyIds) {
        this.partyIds = partyIds;
    }

    public int getAllowType() {
        return allowType;
    }

    public void setAllowType(int allowType) {
        this.allowType = allowType;
    }

    public List<String> getAllowUserList() {
        return allowUserList;
    }

    public void setAllowUserList(List<String> allowUserList) {
        this.allowUserList = allowUserList;
    }

    @Override
    public String toString() {
        return "Group{" +
                "groupId='" + groupId + '\'' +
                ", groupName='" + groupName + '\'' +
                ", userList=" + userList +
                ", groupList=" + groupList +
                ", partyIds=" + partyIds +
                ", allowType=" + allowType +
                ", allowUserList=" + allowUserList +
                '}';
    }
}
